﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DigibizTree
{
    public static class DigibizConstants
    {
        /// <summary>
        /// These are the extensions to check if a file is an image.
        /// A thumbnail will be available if it is. This is hardcoded because it also is in the Umbraco source code.
        /// </summary>
        public const string IMAGETYPES = ",jpeg,jpg,gif,bmp,png,tiff,tif,";

        /// <summary>
        /// This is the default error message.
        /// </summary>
        public const string DEFAULTERROR = "An unknown error occurred. This has been logged.";

        /// <summary>
        /// This is the default error message in a javascript alert box.
        /// </summary>
        public const string DEFAULTERRORALERT = "alert('" + DigibizConstants.DEFAULTERROR + "');";

        /// <summary>
        /// The name used for cookies.
        /// </summary>
        public const string COOKIENAME = "DigibizPicker";

        /// <summary>
        /// The default value if the all extensions field is empty.
        /// </summary>
        public const string ALLEXTENSIONS = "all";

        /// <summary>
        /// The default value if the xpath start node field is empty.
        /// </summary>
        public const string DEFAULTSTARTNODEXPATH = "/descendant::Folder";

        /// <summary>
        /// The id if a start node has no access.
        /// </summary>
        public const int NOACCESSID = -123456789;

        /// <summary>
        /// The max width of image previews to show in the Select Dialog
        /// </summary>
        public const int IMAGEPREVIEWWIDTH_SELECT = 100;

        /// <summary>
        /// The max height of image previews to show in the Select dialog
        /// </summary>
        public const int IMAGEPREVIEWHEIGHT_SELECT = 100;

        /// <summary>
        /// The max width of image previews to show in the Create Dialog
        /// </summary>
        public const int IMAGEPREVIEWWIDTH_CREATE = 100;

        /// <summary>
        /// The max height of image previews to show in the Create dialog
        /// </summary>
        public const int IMAGEPREVIEWHEIGHT_CREATE = 100;

        /// <summary>
        /// Whether or not to indicate crops in image previews (by adding dashed border)
        /// </summary>
        public const bool IMAGEPREVIEW_INDICATECROPS = true;
    }
}
